<template>
  <footer class="footer">
    <span class="todo-count">剩余<strong>{{countNumber}}</strong></span>
    <ul class="filters">
      <li>
        <a :class="{selected:$store.state.add.isSel === 'all'}" href="javascript:;" @click="isSelTask('all')">全部</a>
      </li>
      <li>
        <a :class="{selected:$store.state.add.isSel === 'no'}" href="javascript:;" @click="isSelTask('no')">未完成</a>
      </li>
      <li>
        <a :class="{selected:$store.state.add.isSel === 'yes'}" href="javascript:;" @click="isSelTask('yes')">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="removeList">清除已完成</button>
  </footer>
</template>

<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
computed:{
   ...mapGetters({countNumber:'add/countList'}),
  //  ...mapState({isSel:'add/isSel'})
},
methods:{
  ...mapMutations({isSelTask:'add/isSelTask',removeList:'add/removeList'})
}
}
</script>
